<?php

declare(strict_types=1);

namespace App\Model;



/**
 * @property int $id 自增ID
 * @property string $coupon_name 优惠券名称
 * @property string $price 面额
 * @property string $min_price_used 满多少元使用 0代表无限制
 * @property int $discount_rate 折扣比率
 * @property int $valid_type 类型0现金1折扣
 * @property int $valid_days 有效期时长(天)
 * @property int $sort 排序
 * @property int $status  状态 1 正常 0无效
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 */
class Coupon extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'coupon';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'coupon_name', 'price', 'min_price_used', 'discount_rate', 'valid_type', 'valid_days', 'sort', 'status', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'discount_rate' => 'integer', 'valid_type' => 'integer', 'valid_days' => 'integer', 'sort' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
